package com.example.demo.synchronizationDemo;

/**
 * Created by 蔡超 on 2018/10/9.
 */
public class Person {
    public synchronized void m1() throws InterruptedException {
        System.out.println(Thread.currentThread().getName() + " m1.............." + System.currentTimeMillis());
        Thread.sleep(2000);
    }

    public void m2(){
        System.out.println(Thread.currentThread().getName() + " m2.................." + System.currentTimeMillis());
    }
}
